<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>合规性检查结果</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #f4f4f4;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      margin: 0;
      padding: 40px;
    }

    h1 {
      color: #333;
      margin-bottom: 40px;
      text-align: center;
      font-size: 24px;
    }

    .container {
      background-color: #fff;
      padding: 50px;
      border-radius: 20px;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
      width: 95%;
      max-width: 1200px;
      box-sizing: border-box;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      margin-bottom: 30px;
    }

    th, td {
      border: 1px solid #ddd;
      padding: 16px;
      text-align: left;
    }

    th {
      background-color: #f2f2f2;
      font-weight: bold;
    }

    tr:nth-child(even) {
      background-color: #f9f9f9;
    }

    tr:hover {
      background-color: #f5f5f5;
    }

    .download-buttons {
      display: flex;
      justify-content: center;
      gap: 20px;
      margin-top: 30px;
    }

    button {
      background-color: #007bff;
      color: #fff;
      border: none;
      padding: 15px 40px;
      border-radius: 7px;
      cursor: pointer;
      font-size: 18px;
      transition: background-color 0.3s ease;
    }

    button:hover {
      background-color: #0056b3;
    }
  </style>
</head>

<body>
  <div class="container">
    <h1>合规性检查结果</h1>
    <table>
      <thead>
        <tr>
          <th>不符合法规的内容</th>
          <th>违反的法律法规</th>
        </tr>
      </thead>
      <tbody>
        {% for result in results %}
        <tr>
          <td>{{ result.content }}</td>
          <td>{{ result.law }}</td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
    <div class="download-buttons">
      <a href="/export-excel?temp_file={{ temp_file }}" download="compliance_results.xlsx"><button>导出Excel文件</button></a>
      <a href="/export-docx?temp_file={{ temp_file }}" download="compliance_results.docx"><button>导出Docx文件</button></a>
    </div>
  </div>
</body>

</html>